
cc.Class({
    extends: cc.Component,

    properties: {
        startAudio:cc.AudioClip
    },

    //显示倒计时 结束之后开始游戏
    countDown:function () {
        var self = this;
        var lable = this.node.getComponent(cc.Label);
        lable.string = "C'mon";
        self.node.active = true;
        Global.game.winLabel.active = false;
        Global.audioPlay(this.startAudio);
        setTimeout(function(){
            lable.string = "Fight!";
            setTimeout(function(){
                self.node.active = false;
                Global.game.cocosLoad();
                if (Global.isJoin == false) {
                    var sendData = {
                        type: "getNewStar"
                    };
                    var sendString = JSON.stringify(sendData);
                    Global.ws.send(sendString);
                }
            },500)
            return;
        }, 700);
    }
});
